package com.yanfan.maintain.service;


import com.yanfan.attach.domain.DeviceDetail;
import com.yanfan.common.core.domain.AjaxResult;
import com.yanfan.energy.domain.*;
import com.yanfan.maintain.domain.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 设备巡检模块接口
 *
 * @author caijinkang
 * @date 2023/3/9 15:10
 * @return null
 */
public interface InspectionService {
    /**
     * 查询巡检任务记录列表信息
     *
     * @param inspectionTask
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/4/4 11:19
     */
    AjaxResult findTaskRecord(InspectionTask inspectionTask);

    /**
     * 查询巡检计划列表信息
     *
     * @param inspectionPlan
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/4/9 11:06
     */
    AjaxResult findPlanRecord(InspectionPlan inspectionPlan);

    /**
     * 查询巡检路线
     *
     * @param inspectionBody
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/9 15:34
     */
    AjaxResult findInspectionRoute(InspectionBody inspectionBody);

    /**
     * 查询设备打卡点
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/9 17:47
     */
    AjaxResult findClockingRoute();

    /**
     * 查询设备检查项
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/17 11:34
     */
    AjaxResult findClockingRouteCheck();

    /**
     * 添加设备巡检路线
     *
     * @param inspectionRoute
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 9:27
     */
    AjaxResult addInspectionRoute(InspectionRoute inspectionRoute);

    /**
     * 更新设备巡检路线
     *
     * @param inspectionRoute
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/9 17:58
     */
    AjaxResult updateInspectionRoute(InspectionRoute inspectionRoute);

    /**
     * 删除设备巡检路线
     *
     * @param id
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/9 18:03
     */
    AjaxResult deleteInspectionRoute(Integer id);

    /**
     * 查询巡检计划列表
     *
     * @param inspectionPlanBody
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 10:35
     */
    AjaxResult findInspectionPlan(InspectionPlanBody inspectionPlanBody);

    /**
     * 查询任务里的任务详情->巡检计划列表
     *
     * @param inspectionPlanBody
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/14 17:23
     */
    AjaxResult findInspectionPlanTwo(InspectionPlanBody inspectionPlanBody);

    /**
     * 查询巡检规则
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 10:53
     */
    AjaxResult findInspectionRule();

    /**
     * 添加巡检计划信息
     *
     * @param inspectionPlan
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 10:57
     */
    AjaxResult addInspectionPlan(InspectionPlan inspectionPlan);

    /**
     * 更新巡检计划信息
     *
     * @param inspectionPlan
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 10:59
     */
    AjaxResult updateInspectionPlan(InspectionPlan inspectionPlan);

    /**
     * 根据id删除巡检计划信息
     *
     * @param id
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 11:19
     */
    AjaxResult deleteInspectionPlan(Integer id);

    /**
     * 查询巡检任务列表信息
     *
     * @param inspectionTaskBody
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 11:07
     */
    AjaxResult findInspectionTask(InspectionTaskBody inspectionTaskBody);

    /**
     * 新增巡检任务信息
     *
     * @param inspectionTask
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 11:12
     */
    AjaxResult addInspectionTask(InspectionTask inspectionTask);

    /**
     * 修改巡检任务信息
     *
     * @param inspectionTask
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 11:13
     */
    AjaxResult updateInspectionTask(InspectionTask inspectionTask);

    /**
     * 根据id删除巡检任务信息
     *
     * @param id
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 11:21
     */
    AjaxResult deleteInspectionTask(Integer id);

    /**
     * 查询巡检任务分布饼图
     *
     * @param range day/week/month - 日/周/月
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 11:31
     */
    AjaxResult findInspectionTaskChart(String range);

    /**
     * 巡检缺陷分布饼图
     *
     * @param range
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 11:35
     */
    AjaxResult findInspectionFlawChart(String range);

    /**
     * 巡检上报柱状图
     *
     * @param range
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/10 11:37
     */
    AjaxResult findInspectionReportedChart(String range);

    /**
     * 查询巡检日历
     *
     * @param calendarBody
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/13 16:22
     */
    AjaxResult findInspectionCalendar(CalendarBody calendarBody);

    /**
     * 查询巡检计划模板
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/15 17:52
     */
    AjaxResult findInspectionPlanTemplate();

    /**
     * 下载巡检日程信息
     *
     * @param response
     * @param calendarBody
     * @author caijinkang
     * @date 2023/3/16 9:39
     */
    void inspectionCalendarByReport(HttpServletResponse response, CalendarBody calendarBody);

    /**
     * 查询系统信息下拉框
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/17 10:27
     */
    AjaxResult findSystemComboBox();

    /**
     * 查询公司下拉框信息
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/17 11:06
     */
    AjaxResult findArtsVisionComboBox();

    /**
     * 查询设备类别下拉框信息
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/17 11:06
     */
    AjaxResult findCategoryComboBox();

    /**
     * 查询设备分组下拉框信息
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/17 11:06
     */
    AjaxResult findGroupComboBox();

    /**
     * 查询巡检路线
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/21 16:33
     */
    AjaxResult findInspectionLine();

    /**
     * 根据巡检路线查询路线和检查项
     *
     * @param id
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/21 16:34
     */
    AjaxResult findInspectionCheckByLine(Integer id);

    /**
     * 查询巡检计划下拉框
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/3/23 9:36
     */
    AjaxResult findPlanComboBox();

    /**
     * 根据设备id查询路线
     *
     * @param deviceId
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/4/10 9:15
     */
    AjaxResult findRouteByDeviceId(Integer deviceId);

    /**
     * 查询安装机位下拉框
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/4/14 18:08
     */
    AjaxResult findPlacement();

    /**
     * 查询安装机位下拉框信息（权限查看）
     *
     * @return com.ruoyi.common.core.domain.AjaxResult
     * @author caijinkang
     * @date 2023/5/5 16:11
     */
    AjaxResult findPlacementByUser();


    List<DeviceDetail> selectDeviceByRoutesId(Long routesId);

    InspectionRoute selectInspectionRoutesByRoutesId(Long routesId);

    InspectionTask selectInspectionTaskById(Long id);

    AjaxResult findInspectionTaskRouteLog(Long id);

    AjaxResult updateInspectionTaskRouteLog(InspectionRoute route);

    int checkedInspectionTaskItems(Long taskId, String serialNumber);
}
